#-*- codeing = utf-8 -*-
#@Time: 2021/9/11 19:05
#@Author: Ivan
#@File: 06-if.py
#@Software: PyCharm

'''
比较运算符
==  !=  >  >=  <  <=
'''

# age = int(input('输入年龄：'))
#
# if age >= 18:
#     print('你已成年...')
# else:
#     print('你还没成年...')
#
# print('code over!')

'''
逻辑运算符
and or not
'''
# num = 10
# if num >= 0 and num <= 10:
#     print('num in 0-10')
# else:
#     print('num not in 0-10')


# score = 80
# if score < 60:
#     print('不合格')
# elif score < 70:
#     print('合格')
# elif score < 80:
#     print('良好')
# else:
#     print('优秀')


# age = 18
# if age < 18:
#     if age < 12:
#         print('儿童')
#     else:
#         print('青少年')
# else:
#     print('成年')


import random

# 玩家
p = int(input('请输入你出的拳：(1剪刀  2石头 3布)'))

# 电脑
c = random.randint(1, 3)

if (p == 1 and c == 3) \
        or (p == 2 and c == 1) \
        or (p == 3 and c == 2):
    print('你赢了')
elif c == p:
    print('平局')
else:
    print('电脑赢了')




